/*
 * Unicode.h
 *
 *  Created on: 2012-12-7
 *      Author: yangentao@gmail.com
 */

#pragma once;

#include <string>
#include <windows.h>
using namespace std;
namespace yet {

//length =-1, auto calc the text length

wstring decode(UINT codePage, const char* text, int length = -1);
string encode(UINT codePage, const wchar_t* text, int length = -1);
//codepage = CP_UTF8
wstring decodeUtf8(const char* text, int length = -1);
string encodeUtf8(const wchar_t* text, int length = -1);
//codepage = CP_ACP
wstring decodeACP(const char* text, int length = -1);
string encodeACP(const wchar_t* text, int length = -1);

} /* namespace yet */
